home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
pctjjl86.arc
/
ANIMATE.ARC
/
DRIVCXOR.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-04-16
|
869b
|
44 lines
; *** Listing 4 ***
;
;Assembly language subroutine for C exclusive-OR driver,
; in format required by Mark Williams C compiler.
;Exclusive-ORs byte at color display offset.
;
; Input:
; parm 1 - byte to exclusive-OR.
; parm 2 - offset to exclusive-OR byte at.
;
; Output: none
;
CGROUP GROUP CODE
;
;Parameter layout for use in addressing the 2 parameters on the stack.
;
dyns struc
old_bp dw ?
old_ds dw ?
retn dw ?
p1 dw ?
p2 dw ?
dyns ends
;
code segment byte public 'CODE'
public putbyt_
assume cs:cgroup
;
putbyt_ proc near
push ds
push bp
mov bp,sp
mov al,byte ptr [bp].p1 ;get byte to xor into display RAM
mov bx,0b800h
mov ds,bx ;point segment to color display RAM
mov bx,[bp].p2 ;get screen offset to xor byte at
xor [bx],al ;xor byte into display RAM
pop bp
pop ds
ret
putbyt_ endp
code ends
end